package com.c2soft.nepalcmx.services;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.c2soft.nepalcmx.command.OrderCommand;
import com.c2soft.nepalcmx.command.WithdrawCommand;
import com.c2soft.nepalcmx.dao.OrderMgmtDAO;
import com.c2soft.nepalcmx.dao.WithdrawlDAO;

@Service
public class WithdrawlService {

	@Autowired
	private WithdrawlDAO withdrawDAO;

	public void withdrawlOrderService(WithdrawCommand withdrawl) {
		withdrawDAO.saveWithdrawService(withdrawl);
	}
	public List<WithdrawCommand> getWithdrawals(String brokerId) {
		
		return withdrawDAO.findAllWithdrawals(brokerId);
	}
	
	
public List<WithdrawCommand> getBWithdrawals() {
		
		return withdrawDAO.findAllBrokersWithdrawals();
	}
	
	public void deleterwithdrawalAccount(String id) {
		
		 withdrawDAO.deleteWithdrawal(id);
		}
	
	
}
